import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/textEditList'
        },
        {
            path: '/',
            component: () => import('../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
             
                {
                    path: '/userList',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/userList.vue'),
                    meta: { title: '用户列表' }
                },
              
                {
                    path: '/logList',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/logList.vue'),
                    meta: { title: '日志管理' }
                },
             
            
                {
                    // 富文本编辑器组件
                    path: '/textEditList',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/textEditList.vue'),
                    meta: { title: '宝丰县项目告知单二维码生成系统' }
                },
                
             
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
          
            
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
             
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
